[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 fputchar()              Write a Character to a Stdout

 #include   <stdio.h>

 int fputchar(c);
 int        c;                           Character to be written

        This function is the same as putc(), except that it outputs a
        character to stdout automatically.

       Returns:     The character written, if successful.  EOF is
                    returned to indicate an error.  Since EOF is a
                    legitimate integer value, use ferror() to verify an
                    error condition.

   -------------------------------- Example ---------------------------------

 #include <stdio.h>

 int main(void)

    char msg[] = "Hello world!";
    int j = 0;

    while (msg[j])
    {
       fputchar(msg[j]);
       j++;
    }
    return 0;


See Also: fgetchar()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson